﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Webtest.Models;
using Webtest.Models.ViewModel;

namespace Webtest.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            HomeIndexVM display = new HomeIndexVM();
            display.Customer = new Customer();
            display.Customer.Name = "Sam";
            display.Customer.ID = 1;
            display.Customer.Books = new List<Book>()
            {
                new Book(1) { Title = "The Book", Price = 10.0M},
                

            };
           
            return View(display);
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}